<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.core.orm.hibernate.SpringSecurityUtils"%>
<%@ include file="/common/taglibs.jsp" %>
<%@ taglib prefix="page" uri="http://blog.sina.com.cn/mpl398235717" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    
    <title>欢迎光临</title>
	
  </head>
  
  <body> 
    欢迎光临 首页<% 
    if(SpringSecurityUtils.getCurrentUserName().equals("")||SpringSecurityUtils.getCurrentUserName().equals("roleAnonymous"))
    {%><a href="${ctx}/index/index/login.htm">登录</a>
    <%}else { 
    out.print("当前用户:"+SpringSecurityUtils.getCurrentUserName());
    %>
    <a href="${ctx}/user/users.htm">进入后台</a>
    <a href="${ctx}/j_spring_security_logout">退出登录</a>
    <%} %>
    <br>
    <center>文章列表<form action="${ctx}/index/index/search.htm" method="post"><input type="text" name="search" /><input type="submit" value="查询"/></form></center>
    </hr>
   <c:forEach var="xx" items="${ariticlePage.result}">
   <a target="_blank" href="${ctx}/ariticle/ariticle.htm?id=${xx.id}">${xx.title}</a>
   <div style="border-bottom:#993310 1px dashed; height:3px;  width:50%;text-align:left;"></div> 
   </c:forEach>
   <div>
    <page:page style="border:1px solid;border-color:red" url="${ctx}/index/index.htm?pageNo=" currentPage="${ariticlePage.pageNo}" jsFunction="aa" countPage="${ariticlePage.totalPages}"></page:page>
    <script>
     function aa(a)
     {
      window.location.href="${ctx}/index/index.htm?pageNo="+a;
     }
    </script>
   </div>
  </body>
</html>
